package yang.action;

import org.apache.log4j.Logger;

import org.apache.struts2.convention.annotation.Action;
import org.springframework.beans.factory.annotation.Autowired;

import yang.service.OfficeServiceI;
/**
 * 
 * @ClassName: OfficeAction
 * @Description: 科室请求
 * @author: Administrator
 * @date: 2014年7月13日 下午9:21:44
 */
@Action("officeAction")
public class OfficeAction extends BaseAction {
	/**
	 * Logger for this class
	 */
	private static final Logger logger = Logger.getLogger(OfficeAction.class);

	private OfficeServiceI officeService; 
	/**
	 * 
	 * @方法:查询所有科室
	 * @author:阳
	 * 2014年6月10日
	 */
	public void findAll() {
		try {
			super.writeJson(officeService.findAllOffice());
			logger.info("成功");
		} catch (Exception e) {
			logger .error(e.getMessage());
		}
	}
	//---- get set ------
	public OfficeServiceI getOfficeService() {
		return officeService;
	}
	@Autowired
	public void setOfficeService(OfficeServiceI officeService) {
		this.officeService = officeService;
	}
	
}
